package net.eicp.nada;

class Tank {
	boolean Full;
	public Tank() {
		Full = false;
	}
	public void SetFull() {
		Full = true;
	}
	public void SetEmpty(){
		Full = false;
	}
	protected void finalize(){
		if (Full)
			System.out.println("Error! Tank is not empty!");
	}
}

public class Twelve {
	public static void main(String[] args){
		Tank a = new Tank();
		a.SetFull();
		a = null;
		System.gc();//不是每次都会被清洗
	}
}
